//! $Id$
//!
//! @file    ConfigRegistry.h
//! @author  Johan Andersson <skagget77@gmail.com>
//! @date    Sun Oct 04 14:24 2009
//! @ingroup IoCppDetail
//!

#if !defined(IOCPP_CONFIGREGISTRY_H)
#define IOCPP_CONFIGREGISTRY_H

#include "IoCpp/Container.h"

#include <vector>

namespace IoCpp
{
namespace Detail 
{
   //!
   //! @author  Johan Andersson <skagget77@gmail.com>
   //! @date    Sun Oct 04 21:20 2009
   //! @ingroup IoCppDetail
   //!
   //! The ConfigRegistry class.
   //!
   class ConfigRegistry
   {
   public :
      //!
      //! Adds a configuration to the configuration registry.
      //!
      //! @param provider A configuration provider.
      //!
      void AddConfiguration( ConfigProvider provider );

      //!
      //! Runs all registered configuration providers.
      //!
      //! @param config The container's configuration.
      //!
      void Configure( Configuration& config ) const;

   private :
      std::vector<ConfigProvider> providers;
   };
}
}

#endif   // IOCPP_CONFIGREGISTRY_H
